package leetcode;
//2021蓝桥杯卡片
public class Card {
    public static void main(String[] args) {
        int[]a=new int[10];
        for (int i = 1; ; i++) {
            int n=i;
            while (n>0){
                int m=n%10;
                a[m]++;

                n=n/10;
                if(a[m]==2021){
                    if(n<0) System.out.println(i-1);
                    else System.out.println(i);
                }
            }
        }

    }


}
